package com.jf.test.mvp.base

import androidx.lifecycle.ViewModel

/**
 * @Class: BasePresenter
 * @Description:
 * @author: github.com/jackyflame
 * @Date: 2021/3/10
 */
abstract class BasePresenter<out V:IView<BasePresenter<V>>> : IPresenter<V>,ViewModel() {

    private var mView:IView<*>? = null;

    fun init(owner: IView<*>){
        mView = owner;
    }

    fun getView() : V? {
        return mView?.let { mView as V }
    }
}